class MapReduce:
    END = "Map Datas is over geted"

    @classmethod
    def Map(cls, das, block):
        lenght = len(das)
        flag_has_any = lenght % block
        per_group_count = int(lenght / block)

        if flag_has_any > 0:
            lenght -= flag_has_any
            per_group_count += 1
        page = 1
        while page <= block:
            start_index, end_index = per_group_count * (page - 1), per_group_count * page
            page += 1
            data = das[start_index: end_index]
            if start_index >= lenght:
                yield MapReduce.END
            else:
                yield data

    @classmethod
    def Reduce(cls):
        ...


if __name__ == "__main__":


    for a, i in enumerate(MapReduce.Map(range(100000), 25)):
        if i != MapReduce.END:
            print(a, list(i))

